package br.edu.fa7.javabasics.module1.poo.interfaces;

import java.util.ResourceBundle;

import br.edu.fa7.javabasics.ApplicationMessages;

/**
 * Classe de teste da classe {@link Operacao} atraves de suas implementacoes
 * @author charles.marques
 * @version 1.0
 * @since 29.10.2014
 */
public class TesteOperacao {
	private Operacao operacao;
	
	public TesteOperacao(Operacao operacao) {
		this.operacao = operacao;
	}
	
	public void comandar() {
		operacao.ligar();
		operacao.desligar();
	}

	public static void main(String args[]) {
		System.out.println("TesteOperacao.main():");
		System.out.println(ResourceBundle.getBundle("messages_pt").getString(ApplicationMessages.MENSAGEM_OPERACAO_TELEVISAO));
		TesteOperacao testeOperacao = new TesteOperacao(new TelevisaoPlana());
		testeOperacao.comandar();
		System.out.println();
		
		System.out.println(ResourceBundle.getBundle("messages_pt").getString(ApplicationMessages.MENSAGEM_OPERACAO_AUTOMOVEL));
		testeOperacao = new TesteOperacao(new Automovel());
		testeOperacao.comandar();
		
	}
}
